<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>活动管理--编辑赠品</title>
    <link rel="icon" href="favicon.ico" type="images/ico">
    <meta name="author" content="dc">
    <meta charset="utf-8">
    <link rel="stylesheet" type="text/css" href="/css/materialdesignicons.min.css">
    <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="/css/animate.min.css">
    <link rel="stylesheet" type="text/css" href="/css/style.min.css">
    <link href="/js/bootstrap-table/bootstrap-table.min.css" rel="stylesheet" />
    <link rel="stylesheet" href="/js/jquery-confirm/jquery-confirm.min.css" />
    <link rel="stylesheet" href="/css/input_tags.css"/>
    <!--时间选择插件-->
    <link rel="stylesheet" href="/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css" />
    <link rel="stylesheet" type="text/css" href="/css/daterangepicker.css" />
    <!--日期选择插件-->
    <link rel="stylesheet" href="/js/bootstrap-datepicker/bootstrap-datepicker3.min.css">
    <link rel="stylesheet" href="/js/need/verfont.css" />
    <!-- 多选下拉 -->
    <link rel="stylesheet" href="/css/bootstrap-multiselect.css" type="text/css"/>
    <link rel="stylesheet" href="/css/bootstrap-select.css" type="text/css"/>
    <link rel="stylesheet" href="/css/skin.css"/>
    <!-- css -->
    <link rel="stylesheet" href="/css/activityManager/addProductGift.css" />
</head>
<body>
<div class="container-fluid">
    <div class="row">
        <div class="col-sm-12">
            <div class="card">
                <div class="card-header">
                    <h1>编辑赠品</h1>
                </div>
                <div class="card-body">
                    <form class="well form-well">
                        <input type="text" th:value="${gift.productGiftActivityId}" id="editGiftId" hidden>
                        <input type="text" th:value="${gift.customerProductId}" id="editProductId" hidden>
                        <div class="row">
                            <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                                <label class="control-label label-required" for="giftActivityName">赠品活动名称</label>
                                <div class="form-content">
                                    <input type="text" class="form-control" th:value="${gift.giftActivityName}" id="giftActivityName" placeholder="请输入赠品名称">
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                                <label class="control-label label-required">起止时间</label>
                                <div class="form-content">
                                    <input type="text" id="giftActivityPeriodValidity" th:value="${#dates.format(gift.giftPeriodValidityStart,'yyyy-MM-dd HH:mm')} + ' 至 '+ ${#dates.format(gift.giftPeriodValidityEnd,'yyyy-MM-dd HH:mm')}" class="form-control" autocomplete="off">
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                                <label class="control-label">上架状态</label>
                                <div class="form-content">
                                    <input type="text" th:if="${gift.giftShelfStatus == '0'} " value="上架"  disabled class="form-control">
                                    <input type="text" th:if="${gift.giftShelfStatus == '1'} " value="下架"  disabled class="form-control">
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                                <label class="control-label label-required">兑换方式</label>
                                <div class="form-content">
                                    <select class="form-control" id="exchangeMethod" type="text" title="请选择兑换方式">
                                        <option th:selected="${gift.exchangeMethod == '1'}" value="1">电子卡</option>
                                        <option th:selected="${gift.exchangeMethod == '2'}" value="2">兑换码</option>
                                        <option th:selected="${gift.exchangeMethod == '3'}" value="3">学习码</option>
                                        <option th:selected="${gift.exchangeMethod == '4'}" value="4">充值码</option>
                                        <option th:selected="${gift.exchangeMethod == '5'}" value="5">税法直通车学习卡</option>
                                        <option th:selected="${gift.exchangeMethod == '6'}" value="6">其他</option>
                                    </select>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                                <label class="control-label label-required">赠品</label>
                                <div class="form-content">
                                    <select multiple="multiple" id="giftList"></select>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                                <label class="control-label label-required" for="giftCategory">赠品类别</label>
                                <div class="form-content">
                                    <select class="form-control" title="请选择" id="giftCategory">
                                        <option th:selected="${gift.giftCategory == '1'}" value="1">产品类</option>
                                        <option th:selected="${gift.giftCategory == '2'}" value="2">价格类</option>
                                    </select>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                                <label class="control-label label-required">关联产品</label>
                                <div class="form-content">
                                    <select id="productList" class="form-control" title="请选择" data-live-search="true"></select>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                                <label class="control-label label-required" for="giftActivityPriceStart">起止价格</label>
                                <div class="form-content input-group" id="giftActivityPrice">
                                    <input type="text" class="form-control" id="giftActivityPriceStart" th:value="${gift.giftActivityPriceStart}" placeholder="起始价格">
                                    <span class="input-group-addon">-</span>
                                    <input type="text" class="form-control" id="giftActivityPriceEnd" th:value="${gift.giftActivityPriceEnd}" placeholder="截止价格">
                                </div>
                            </div>
                            <!--<label id="productWay" class="col-sm-1 control-label" onclick="showModel('product')">关联产品</label>
                            <label id="priceWay" class="col-sm-1 control-label" onclick="showModel('gift')">赠品</label>-->
                        </div>
                    </form>
                    <div class="form-actions">
                        <button class="btn btn-primary btn-label" type="button" onclick="addGiftProduct();"><label><i class="mdi mdi-check"></i></label>提交</button>
                        <div class="btn btn-default">取消</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="/js/main.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table-zh-CN.min.js"></script>
<script type="text/javascript" src="/js/popper.min.js"></script>
<script type="text/javascript" src="/js/jquery.cookie.min.js"></script>
<!--时间选择插件-->
<script src="/js/bootstrap-datetimepicker/moment.min.js"></script>
<script src="/js/jquery-confirm/jquery-confirm.min.js"></script>
<script src="/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js"></script>
<script src="/js/bootstrap-datetimepicker/locale/zh-cn.js"></script>
<!--日期选择插件-->
<script src="/js/bootstrap-datepicker/bootstrap-datepicker.min.js"></script>
<script src="/js/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js"></script>
<script type="text/javascript" src="/js/crm/common/dataRangePicker.min.js"></script>
<!-- 多选框下拉 -->
<script type="text/javascript" src="/js/bootstrap-multiselect.js"></script>
<script type="text/javascript" src="/js/bootstrap-select.js"></script>
<script type="text/javascript" src="/js/bootstrap.lyear.dropdowntree.min.js"></script>
<script src="/js/crm/activityManager/addGiftProduct.js"></script>
<!-- 通用js -->
<script src="/js/crm/common/common.js"></script>
</html>